#ifndef ATTRACTIVENESSMAP_H_INCLUDED
#define ATTRACTIVENESSMAP_H_INCLUDED

#include <vector>
using namespace std;
#include "Point.h"

class AttractivenessMap
{
public:
	AttractivenessMap();
	virtual ~AttractivenessMap();
	static AttractivenessMap* instance();
	void setMetrics(int N,int M,double CellX,double CellY);

	Tile RealToLogical(const Point& pnt)const;
	Point LogicalToReal(const Tile& tile)const;
	double at(int x,int y);
	void at(int x,int y,bool positive);

	vector<pair<Tile,double> > getNeighbors(int x, int y);
	int visitsAt(int x, int y);

    bool inRange(int start, int end, int val);

	int N() {return n;}
	int M() {return m;}

	typedef pair<Tile,double> tpair;
private:
	static AttractivenessMap* _instance;
	vector<vector<pair<int,int> > > _map;
	int n,m;
	double cellY,cellX;
};

#endif // ATTRACTIVENESSMAP_H_INCLUDED
